
$(function() {
	Meeting_Record_Detail.init();
})

/**
 * 会议记录详情--js
 * @author cl
 * @date 2019年4月4日
 */
var Meeting_Record_Detail={
	_ID:null,
	_OBJ:null,
	init:function(){
		var obj = GetRequest();
		Meeting_Record_Detail._ID = obj.id;
		Meeting_Record_Detail.findById(Meeting_Record_Detail._ID);
	},
	/**
	 * 根据id查询会议记录详情
	 */
	findById:function(id){
		$.ajax({
			url : "/crm/meetingRecord/findById", 
			dataType : "json", 
			async : true,
			data : {
				id:id
			},
			type : "post",
			success : function(data) {
				Meeting_Record_Detail._OBJ=data;
				$("#meetTitle").text(data.meetTitle);
				$("#meetSpeaker").text(data.meetSpeaker);
				$("#joinUserNames").text(data.joinUserNames);
				$("#meetTime").text(data.meetTime);
				$("#meetContent").text(data.meetContent);
				//附件加载及下载
				var fileParse = JSON.parse(data.meetFilePath);
				var html='';
				$(fileParse).each(function(key,val){
					html+='<li class="file_item filen"><span>'+val.name+'</span><a onclick="preview(\''+val.filePath+'\',1)">预览</a><a onclick="downloadServer(\''+val.filePath+'\',1)">下载</a></li>';
				});
				$("#uploadAc").html(html);
				if(!isBlank(data.powerUserNames)){
					$("#powerUserNames").text(data.powerUserNames);
				}else{
					$("#powerUserNames").parent().css("display","none");
				}
				$("#createUserName").text(data.createUserName);
				$("#isStats").text(data.isStats==0?"待审核可用":data.isStats==1?"审核通过":"审核未通过");
				if(!isBlank(data.auditTime)){
					$("#auditTime").text(data.auditTime);
				}else{
					$("#auditTime").parent().css("display","none");
				}
			},
			error : function() {
				layer.msg("系统错误！", {icon: 2,closeBtn: 0 });;
			}
		});
	}
}
	